package com.fenghuajueli.idiomppp.ui.idiomstory;

import android.os.Bundle;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.fenghuajueli.idiomppp.R;
import com.fenghuajueli.idiomppp.databinding.ActivityIdiomStoryBinding;
import com.fenghuajueli.idiomppp.entity.IdiomStoryEntity;
import com.fenghuajueli.idiomppp.utils.RuntimeDataUtils;
import com.fenghuajueli.libbasecoreui.mvp.BaseActivity;
import com.fenghuajueli.libbasecoreui.utils.ImageLoadManager;



public class IdiomStoryActivity extends BaseActivity {

    TextView idiomStory;
    RelativeLayout containerView;
    TextView idiomName;
    TextView idiomPinYin;
    private IdiomStoryEntity idiomStoryEntity;

    private ActivityIdiomStoryBinding binding;
    private void initview() {
        idiomStory = binding.idiomStory;
        containerView = binding.containerView;
        idiomName = binding.idiomName;
        idiomPinYin = binding.idiomPinYin;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityIdiomStoryBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        initview();
        ImageLoadManager.loadForViewGroup(containerView, R.mipmap.aa_szxl_bj);
        idiomStoryEntity = RuntimeDataUtils.idiomStoryEntity;
        if (idiomStoryEntity != null) {
            idiomName.setText(idiomStoryEntity.getTitle());
            idiomStory.setText(idiomStoryEntity.getContent());
        } else {
            finish();
        }
    }


}
